home *** CD-ROM | disk | FTP | other *** search
- -- background: 3657 from stack: in
- -- bmap block id: 4158
- -- flags: 0000
- -- background id: 0
- -- name:
- ----- HyperTalk script -----
- on openbackground
- set userlevel to 2
- hide menubar
- end openbackground
-
-
-
- -- part 5 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=131 top=12 right=42 bottom=224
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 14
- -- text size: 24
- -- style flags: 256
- -- line height: 32
- -- part name: year
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=406 top=12 right=44 bottom=508
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Calendar
- ----- HyperTalk script -----
- on mouseUp
- if background field year is empty then
- answer "PLEASE ENTER THE YEAR FIRST!" with "OK"
- click at loc of background field year
- else
- -- Clean Up
- get background field year
- put it into yearvar
- visual effect wipe left slowly
- go to card months1
- put empty into background field month1
- put empty into background field month2
- put empty into background field month3
- put empty into background field month4
- put empty into background field month5
- put empty into background field month6
- put yearvar into background field year
- -- Figure out beginning of year
- put abs (yearvar - 2000) into difference
- put ((difference DIV 4) - (difference DIV 100)) into leapyears
- put (leapyears + (difference DIV 400) + 1) into leapyears
- put 7 into firstyear
- if yearvar > 2000 then
- put (7 + difference + leapyears) into firstyear
- repeat while firstyear > 7
- put firstyear - 7 into firstyear
- end repeat
- else
- if yearvar < 2000 then
- put (7 - difference -leapyears + 1) into firstyear
- repeat while firstyear < 1
- put firstyear + 7 into firstyear
- end repeat
- end if
- end if
- -- Put months
- -- January
- put 31 into daysmonth
- put firstyear into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month1
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month1
- else
- put temp & " " into line row of background field month1
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month1
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month1
- else
- put temp & daycount into line row of background field month1
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month1
- else
- put temp & " " & daycount into line row of background field month1
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- -- February
- put (firstmonth2 + 31) into firstmonth
- put firstmonth into firstmonth2
- if (yearvar MOD 4) = 0 then
- if (yearvar MOD 100) = 0 then
- if (yearvar MOD 400) = 0 then
- put 29 into daysmonth
- else
- put 28 into daysmonth
- end if
- else
- put 29 into daysmonth
- end if
- else
- put 28 into daysmonth
- end if
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month2
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month2 else
- put temp & " " into line row of background field month2
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month2
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month2
- else
- put temp & daycount into line row of background field month2
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month2
- else
- put temp & " " & daycount into line row of background field month2
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- March
- put 31 into daysmonth
- if (yearvar MOD 4) =0 then
- if (yearvar MOD 100) = 0 then
- if (yearvar MOD 400) = 0 then
- put (firstmonth2 + 29) into firstmonth
- else
- put (firstmonth2 + 28) into firstmonth
- end if
- else
- put (firstmonth2 + 29) into firstmonth
- end if
- else
- put (firstmonth2 + 28) into firstmonth
- end if
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month3
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month3
- else
- put temp & " " into line row of background field month3
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month3
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month3
- else
- put temp & daycount into line row of background field month3
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month3
- else
- put temp & " " & daycount into line row of background field month3
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- April
- put 30 into daysmonth
- put (firstmonth2 + 31) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month4
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month4
- else
- put temp & " " into line row of background field month4
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month4
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month4
- else
- put temp & daycount into line row of background field month4
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month4
- else
- put temp & " " & daycount into line row of background field month4
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- May
- put 31 into daysmonth
- put (firstmonth2 + 30) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month5
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month5
- else
- put temp & " " into line row of background field month5
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month5
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month5
- else
- put temp & daycount into line row of background field month5
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month5
- else
- put temp & " " & daycount into line row of background field month5
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- June
- put 30 into daysmonth
- put (firstmonth2 + 31) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month6
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month6
- else
- put temp & " " into line row of background field month6
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month6
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month6
- else
- put temp & daycount into line row of background field month6
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month6
- else
- put temp & " " & daycount into line row of background field month6
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- -- Clean Up
- visual effect wipe left slowly
- go to card months2
- put empty into background field month1
- put empty into background field month2
- put empty into background field month3
- put empty into background field month4
- put empty into background field month5
- put empty into background field month6
- put yearvar into background field year
- --- July
- put 31 into daysmonth
- put (firstmonth2 + 30) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month1
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month1
- else
- put temp & " " into line row of background field month1
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month1
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month1
- else
- put temp & daycount into line row of background field month1
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month1
- else
- put temp & " " & daycount into line row of background field month1
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- August
- put 31 into daysmonth
- put (firstmonth2 + 31) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month2
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month2 else
- put temp & " " into line row of background field month2
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month2
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month2
- else
- put temp & daycount into line row of background field month2
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month2
- else
- put temp & " " & daycount into line row of background field month2
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- September
- put 30 into daysmonth
- put (firstmonth2 + 31) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month3
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month3
- else
- put temp & " " into line row of background field month3
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month3
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month3
- else
- put temp & daycount into line row of background field month3
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month3
- else
- put temp & " " & daycount into line row of background field month3
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- October
- put 31 into daysmonth
- put (firstmonth2 + 30) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month4
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month4
- else
- put temp & " " into line row of background field month4
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month4
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month4
- else
- put temp & daycount into line row of background field month4
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month4
- else
- put temp & " " & daycount into line row of background field month4
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- November
- put 30 into daysmonth
- put (firstmonth2 + 31) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month5
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month5
- else
- put temp & " " into line row of background field month5
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month5
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month5
- else
- put temp & daycount into line row of background field month5
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month5
- else
- put temp & " " & daycount into line row of background field month5
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- --- December
- put 31 into daysmonth
- put (firstmonth2 + 30) into firstmonth
- put firstmonth into firstmonth2
- repeat while firstmonth > 7
- put (firstmonth - 7) into firstmonth
- end repeat
- put 1 into hloc
- put 1 into daycount
- put 1 into row
- repeat while daycount < (daysmonth + 1)
- repeat while hloc < firstmonth
- get line row of background field month6
- put it into temp
- if hloc = 1 then
- put temp & " " into line row of background field month6
- else
- put temp & " " into line row of background field month6
- end if
- put (1 + hloc) into hloc
- end repeat
- repeat while (hloc < 8) and (daycount < (daysmonth + 1))
- get line row of background field month6
- put it into temp
- if hloc = 1 then
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month6
- else
- put temp & daycount into line row of background field month6
- end if
- else
- if daycount < 10 then
- put temp & " " & daycount into line row of background field month6
- else
- put temp & " " & daycount into line row of background field month6
- end if
- end if
- put (daycount + 1) into daycount
- put (hloc + 1) into hloc
- end repeat
- put 1 into hloc
- put (1 + row) into row
- put 0 into firstmonth
- end repeat
- ---
- end if
- end mouseUp
-
-
- -- part 9 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=20 top=105 right=179 bottom=168
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: month1
-
-
- -- part 13 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=186 top=105 right=179 bottom=334
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: month2
-
-
- -- part 14 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=350 top=105 right=179 bottom=498
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: month3
-
-
- -- part 15 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=20 top=216 right=290 bottom=168
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: month4
-
-
- -- part 16 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=186 top=216 right=290 bottom=334
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: month5
-
-
- -- part 17 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=350 top=216 right=290 bottom=498
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: month6
-
-
- -- part 18 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=18 top=320 right=341 bottom=176
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: More Info
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- go to first card
- end mouseUp
-
-